
var dbUrl = 'jadesoft';
var collections = ['g_itemStatus','t_begin'];
var db = require('mongojs').connect(dbUrl, collections);

function itemStatus(userId, startTm, terms, flag)
{
	this.userId = userId;
	this.startTm = startTm;
	this.terms = terms;
	this.flag = flag;
}

//var itemInfo = new itemStatus('jade','12001309', '30m', 'Y');
/*
db.tdb.save(itemInfo, function(err,rs) {
	console.log('hi');
	if(err) {
		console.log('Iteminfo is not saved! / error : ' + err);
	}
	else
	{
		console.log('Iteminfo is saved!');
	}
});

db.tdb.find({name:'jade'}, function(err, rs) {
	  if( err || !rs) console.log("No female users found");
	  else rs.forEach( function(user) {
	    console.log(user.flag);
	  });
});*/

